<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<!-- <link rel="__ROOT__/Public/Admin/shortcut icon" href="favicon.ico">
	<link href="__ROOT__/Public/Admin/css/plugins/chosen/chosen.css" rel="stylesheet"> -->
<!-- 	<link href="__ROOT__/Public/Admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet"> -->
	<link href="__ROOT__/Public/Admin/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
	<link href="__ROOT__/Public/Admin/css/animate.css" rel="stylesheet">
	<link href="__ROOT__/Public/Admin/css/style.css?v=4.1.0" rel="stylesheet">
	<link href="__ROOT__/Public/Admin/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
	<link href="__ROOT__/Public/Admin/css/official.css" rel="stylesheet">
	<link href="__ROOT__/Public/Admin/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
	<link href="__ROOT__/Public/Admin/js/plugins/gantt/css/style.css" rel="stylesheet">
</head>
<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="ibox float-e-margins">

            <div class="ibox-content">
            <!-- 甘特图 -->	
            <div class="gantt"></div>
               <div class="form-group">
        <a class="btn btn-white" href="javascript:void(0);" onclick="self.location=document.referrer;">返回</a>
        </div>
        </div>
    </div>
	<script src="__ROOT__/Public/Admin/js/jquery.js"></script>  
	<script src="__ROOT__/Public/Admin/js/plugins/sweetalert/sweetalert.min.js"></script>
	<script src="__ROOT__/Public/Admin/js/plugins/gantt/js/jquery.fn.gantt.js"></script>

 <script>
$(function() {

			"use strict";
		
			var str={$data};
			var newobj={$data};
			for(var i=0; i<str.length; i++)  
			{  
				newobj[i].name=str[i].name
				newobj[i].desc=str[i].desc
				var ac=JSON.parse(str[i].values)
				newobj[i].values=ac
			}  
  
			

	

				$(document).ready(function(){
				$(".gantt").gantt({
				source: eval(newobj),
				months:["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
				dow:["周末", "周一", "周二", "周三", "周四", "周五", "周六"],
				scale: "days",
				minScale: "days",// 显示最小的单位
				MaxScale: "months",
				navigate: "scroll",
				//itemsPerPage: '30',   //每页显示的数目
				//startPos:'2017-01-01'
				waitText:"请等待加载...",
				onRender: function() {  //渲染时的事件
         			$('.spacer').html('<div style="text-align: center;padding: 37px;font-weight: bold;">项目进度名称</div>')
    			


    			}

			});
		});
});
 </script>
</body>
</html>